#ifndef USER__H
#define USER__H

#include <string>
#include <limits.h>

class user
{
	private:
		int id;
		std::string name;
		std::string address;
		std::string contact;
	protected:
		user() {}
		virtual ~user() {}
	public:
		int GetID() { return id; }
		virtual int GetType()=0;
		virtual int GetMaxDuration()=0;
		virtual int GetMaxCount()=0;
		std::string GetName() { return name; }
		std::string GetAddress() { return address; }
		std::string GetContact() { return contact; }
		void SetName(std::string name) { this->name=name; }
		void SetAddress(std::string address) { this->address=address; }
		void SetContact(std::string contact) { this->contact=contact; }
};

class citizen : public user
{
	public:
		citizen(std::string name,std::string address,std::string contact);
		int GetType() { return 1; }
		int GetMaxDuration() { return 60; }
		int GetMaxCount() { return 5; }
};

class tutor : public user
{
	public:
		tutor(std::string name,std::string address,std::string contact);
		int GetType() { return 2; }
		int GetMaxDuration() { return 365; }
		int GetMaxCount() { return INT_MAX; }
};

class foreigncitizen : public user
{
	public:
		foreigncitizen(std::string name,std::string address,std::string contact);
		int GetType() { return 3; }
		int GetMaxDuration() { return 30; }
		int GetMaxCount() { return 4; }
};

class guest : public user
{
	public:
		guest(std::string name,std::string address,std::string contact);
		int GetType() { return 4; }
		int GetMaxDuration() { return 14; }
		int GetMaxCount() { return 2; }
};

#endif
